package com.rk.cust.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;

import javax.persistence.criteria.CriteriaBuilder;

@AllArgsConstructor
@Getter
public enum CertType {

    businessCode(0),

    orgCode(1),

    taxCode(2);

    private Integer type;

    public static final CertType of(Integer type){
        if (null == type){
            return null;
        }
        for (CertType certType : CertType.values()) {
            if (certType.type == type){
                return certType;
            }
        }
        throw new TypeNotPresentException("CertType="+type,null);
    }
}
